package com.briup.corejava.day04;

import java.util.Scanner;

/**
 * if的课堂练习
 */
public class Test2 {
    public static void main(String[] args) {
        // 1、获取输入
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入整数时间（0-23）：");
        int time = sc.nextInt();
        // 2、对输入的数据做验证判断
        String s = "好";
        if(time >= 8 && time < 12){
            s = "上午"+s;
        }else if(time >=12 && time <= 14 ){
            s = "中午"+s;
        }else if(time >14 && time <= 18){
            s = "下午"+s;
        }else {
            s = "晚上"+s;
        }
        // 3、输出
        System.out.println(s);
    }
}
